package com.topvision.face.util;


/**
 * 状态机
 * 记录整个程序的状态
 * @author sikaijian
 *
 */
public class ARHandleState {
	
	public static void turnOn(){
		on = true;
	}
	
	public static void turnOff(){
		on = false;
	}
	
	public static boolean isOn(){
		return on;
	}
	
	public static String getLastResultID() {
		return lastResultID;
	}

	public static void setLastResultID(String lastResultID) {
		ARHandleState.lastResultID = lastResultID;
	}

	/**
	 * 设置状态
	 * @param state （ARHandleState中的常量）
	 */
	public static void setState(int state){
		ARHandleState.state = state;
	}
	
	/**
	 * 获取状态
	 * @return ARHandleState中的常量
	 */
	public static int getState(){
		return state;
	}
	
	/**
	 * 手机是否在移动
	 */
	public static boolean shaking = false;
	
	/**
	 * 空闲状态
	 */
	public static final int IDLE = 0x000;
	
	/**
	 * 比对中
	 */
	public static final int MATCHING = 0x001;
	
	/**
	 * AR暂停（结果展示中）
	 */
	public static final int AR_PAUSE = 0x002;
	
	/**
	 * 当前状态
	 */
	private static int state = IDLE;
	
	private static boolean on = true;
	
	private static String lastResultID = null;
}
